<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--在遍历过程中，没有使用索引值-->
  <ul>
    <li v-for="item in movies">{{item}}</li>
  </ul>

  <hr />

  <!--在遍历过程中，获取索引值-->
  <ul>
    <li v-for="(item, index) in movies">{{index + 1}}-{{item}}</li>
  </ul>
</div>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      movies: ['西游记', '水浒传', '红楼梦', '三国演义']
    }
  });
</script>
</body>
</html>